package com.y.simple.global;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(name = "PageData", description = "通用分页查询后对象")
public class PageData {
    @Schema(name = "pageNumber", description = "页码")
    private int pageNumber;

    @Schema(name = "pageSize", description = "每页数量")
    private int pageSize;

    @Schema(name = "count", description = "总条数")
    private long count;

    @Schema(name = "data", description = "数据")
    private Object data;

    public PageData(int pageNumber, int pageSize, long count, Object data) {
        this.pageNumber = pageNumber;
        this.pageSize = pageSize;
        this.count = count;
        this.data = data;
    }
}
